package com.yangchao.webflux.webserver.webClient;

import com.yangchao.webflux.webserver.UserClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.springframework.web.service.invoker.HttpServiceProxyFactory;

@Component
public class WebUserClient {


    @Autowired
    HttpServiceProxyFactory httpServiceProxyFactory;

    @Bean
    public UserClient userClient() {
        return httpServiceProxyFactory.createClient(UserClient.class);
    }
}
